package main

import (
	"CircularQue/que"
	"fmt"
)

func main() {
	cq0 := que.NewCircularQueueChannel(5)
	fmt.Printf("ch|Capacity=%v|size=%v\n", cq0.Capacity(), cq0.Size())

	err := cq0.Enqueue("1")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

	err = cq0.Enqueue("2")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

	err = cq0.Enqueue("3")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

	err = cq0.Enqueue("4")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

	err = cq0.Enqueue("5")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

	err = cq0.Enqueue("6")
	fmt.Printf("ch|err=%v|Capacity=%v|size=%v\n", err, cq0.Capacity(), cq0.Size())

}
